package br.com.mooble.activitys;

import android.app.Activity;
import android.content.Intent;
import android.view.View;
import android.widget.RadioButton;
import br.com.mooble.R;

import com.googlecode.androidannotations.annotations.AfterViews;
import com.googlecode.androidannotations.annotations.Click;
import com.googlecode.androidannotations.annotations.EActivity;
import com.googlecode.androidannotations.annotations.Fullscreen;
import com.googlecode.androidannotations.annotations.NoTitle;
import com.googlecode.androidannotations.annotations.ViewById;
import com.markupartist.android.widget.ActionBar;
import com.markupartist.android.widget.ActionBar.AbstractAction;
 
@NoTitle
@Fullscreen
@EActivity(R.layout.calendario)
public class Calendario extends Activity {
	@ViewById
	RadioButton radioHome;
	@ViewById 
	RadioButton radioCalendario;
	@ViewById
	RadioButton radioForum;
	@ViewById
	RadioButton radioMais;
	@ViewById
	ActionBar actionBar;

	@AfterViews
	void inicializar() {
		configurarActionBar();
		radioCalendario.setChecked(true);

	}

	private void configurarActionBar() {

		actionBar.setTitle("Calendario");
		actionBar.setHomeLogo(R.drawable.ic_calendario_barra);
		actionBar.addAction(new AcaoConfigurar());
	}

	public class AcaoConfigurar extends AbstractAction {

		public AcaoConfigurar() {
			super(R.drawable.gear);

		}

		public void performAction(View view) {

		}
	}

	@Click({R.id.radioHome, R.id.radioForum,
		R.id.radioMais })
	public void onCheckedChanged(View buttonView) {

		if (buttonView.getId() == R.id.radioHome) {
			Intent iHome = new Intent(Calendario.this, Principal_.class);
			Calendario.this.startActivity(iHome);
			Calendario.this
					.overridePendingTransition(R.anim.slide_entrando_esquerda,
							R.anim.slide_saindo_direita);

		} else if (buttonView.getId() == R.id.radioForum) {
			Intent iForum = new Intent(Calendario.this, Forum_.class);
			Calendario.this.startActivity(iForum);
			Calendario.this
					.overridePendingTransition(R.anim.slide_entrando_direita,
							R.anim.slide_saindo_esquerda);

		} else if (buttonView.getId() == R.id.radioMais) {
			Intent iMais = new Intent(Calendario.this, Mais_.class);
			Calendario.this.startActivity(iMais);
			Calendario.this
					.overridePendingTransition(R.anim.slide_entrando_direita,
							R.anim.slide_saindo_esquerda);
		}

	}

}